<?php
namespace pinduoduo\Request;

use pinduoduo\AbstractInterface\Request;

class PddDdkGoodsPromotionUrlGenerateRequest extends Request
{
    /**
     * 多多进宝推广链接生成
     * @var string
     */
    private $type = 'pdd.ddk.goods.promotion.url.generate';

    /**
     * 多多礼金ID
     * @var
     */
    private $cashGiftId;

    /**
     * 自定义礼金标题，用于向用户展示渠道专属福利，不超过12个字
     * @var
     */
    private $cashGiftName;

    /**
     * 自定义参数，为链接打上自定义标签；自定义参数最长限制64个字节；格式为： {"uid":"11111","sid":"22222"} ，其中 uid 用户唯一标识，可自行加密后传入，每个用户仅且对应一个标识，必填； sid 上下文信息标识，例如sessionId等，非必填。该json字符串中也可以加入其他自定义的key。（如果使用GET请求，请使用URLEncode处理参数）
     * @var
     */
    private $customParameters;

    /**
     * 是否生成带授权的单品链接。如果未授权，则会走授权流程
     * @var
     */
    private $generateAuthorityUrl;

    /**
     * 是否生成店铺收藏券推广链接
     * @var
     */
    private $generateMallCollectCoupon;

    /**
     * 是否生成qq小程序
     * @var
     */
    private $generateQqApp;

    /**
     * 是否返回 schema URL
     * @var
     */
    private $generateSchemaUrl;

    /**
     * 是否生成商品推广分享图，仅支持单个商品
     * @var
     */
    private $generateShareImage;

    /**
     * 获取微信ShortLink链接，仅支持单个商品，单个渠道每天生成的shortLink数量有限，请合理生成shortLink链接
     * @var
     */
    private $generateShortLink;

    /**
     * 是否生成短链接，true-是，false-否
     * @var
     */
    private $generateShortUrl;

    /**
     * 是否生成拼多多福利券微信小程序推广信息
     * @var
     */
    private $generateWeApp;

    /**
     * 获取微信小程序码，仅支持单个商品
     * @var
     */
    private $generateWeixinCode;

    /**
     * 支持拼接特殊参数的商品生链参数列表。生链优先级：goods_gen_url_param_list > goods_sign_list，两者按优先级选其一。
     * @var
     */
    private $goodsGenUrlParamList;

    /**
     * 商品goodsSign列表，例如：["c9r2omogKFFAc7WBwvbZU1ikIb16_J3CTa8HNN"]，支持批量生链。goodsSign是加密后的goodsId, goodsId已下线，请使用goodsSign来替代。使用说明：https://jinbao.pinduoduo.com/qa-system?questionId=252
     * @var
     */
    private $goodsSignList;

    /**
     * 素材ID，可以通过商品详情接口获取商品素材信息
     * @var
     */
    private $materialId;

    /**
     * true--生成多人团推广链接 false--生成单人团推广链接（默认false）1、单人团推广链接：用户访问单人团推广链接，可直接购买商品无需拼团。2、多人团推广链接：用户访问双人团推广链接开团，若用户分享给他人参团，则开团者和参团者的佣金均结算给推手
     * @var
     */
    private $multiGroup;

    /**
     * 推广位ID
     * @var
     */
    private $pid;

    /**
     * 搜索id，建议填写，提高收益。来自pdd.ddk.goods.recommend.get、pdd.ddk.goods.search、pdd.ddk.top.goods.list.query等接口
     * @var
     */
    private $searchId;

    /**
     * 招商多多客ID
     * @var
     */
    private $zsduoId;

    public function setType($type)
    {
        $this->type = $type;
    }

    public function getType()
    {
        return $this->type;
    }

    public function setCashGiftId($cashGiftId)
    {
        $this->cashGiftId = $cashGiftId;
    }

    public function getCashGiftId()
    {
        return $this->cashGiftId;
    }

    public function setCashGiftName($cashGiftName)
    {
        $this->cashGiftName = $cashGiftName;
    }

    public function getCashGiftName()
    {
        return $this->cashGiftName;
    }

    public function setCustomParameters($customParameters)
    {
        $this->customParameters = $customParameters;
    }

    public function getCustomParameters()
    {
        return $this->customParameters;
    }

    public function setGenerateAuthorityUrl($generateAuthorityUrl)
    {
        $this->generateAuthorityUrl = $generateAuthorityUrl;
    }

    public function getGenerateAuthorityUrl()
    {
        return $this->generateAuthorityUrl;
    }

    public function setGenerateMallCollectCoupon($generateMallCollectCoupon)
    {
        $this->generateMallCollectCoupon = $generateMallCollectCoupon;
    }

    public function getGenerateMallCollectCoupon()
    {
        return $this->generateMallCollectCoupon;
    }

    public function setGenerateQqApp($generateQqApp)
    {
        $this->generateQqApp = $generateQqApp;
    }

    public function getGenerateQqApp()
    {
        return $this->generateQqApp;
    }

    public function setGenerateSchemaUrl($generateSchemaUrl)
    {
        $this->generateSchemaUrl = $generateSchemaUrl;
    }

    public function getGenerateSchemaUrl()
    {
        return $this->generateSchemaUrl;
    }

    public function setGenerateShortUrl($generateShortUrl)
    {
        $this->generateShortUrl = $generateShortUrl;
    }

    public function getGenerateShortUrl()
    {
        return $this->generateShortUrl;
    }

    public function setGenerateShareImage($generateShareImage)
    {
        $this->generateShareImage = $generateShareImage;
    }

    public function getGenerateShareImage()
    {
        return $this->generateShareImage;
    }

    public function setGenerateShortLink($generateShortLink)
    {
        $this->generateShortLink = $generateShortLink;
    }

    public function getGenerateShortLink()
    {
        return $this->generateShortLink;
    }

    public function setGenerateWeApp($generateWeApp)
    {
        $this->generateWeApp = $generateWeApp;
    }

    public function getGenerateWeApp()
    {
        return $this->generateWeApp;
    }

    public function setGenerateWeixinCode($generateWeixinCode)
    {
        $this->generateWeixinCode = $generateWeixinCode;
    }

    public function getGenerateWeixinCode()
    {
        return $this->generateWeixinCode;
    }

    public function setGoodsGenUrlParamList($goodsGenUrlParamList)
    {
        $this->goodsGenUrlParamList = $goodsGenUrlParamList;
    }

    public function getGoodsGenUrlParamList()
    {
        return $this->goodsGenUrlParamList;
    }

    public function setGoodsSignList($goodsSignList)
    {
        $this->goodsSignList = $goodsSignList;
    }

    public function getGoodsSignList()
    {
        return $this->goodsSignList;
    }

    public function setMaterialId($materialId)
    {
        $this->materialId = $materialId;
    }

    public function getMaterialId()
    {
        return $this->materialId;
    }

    public function setMultiGroup($multiGroup)
    {
        $this->multiGroup = $multiGroup;
    }

    public function getMultiGroup()
    {
        return $this->multiGroup;
    }

    public function setPid($pid)
    {
        $this->pid = $pid;
    }

    public function getPid()
    {
        return $this->pid;
    }

    public function setSearchId($searchId)
    {
        $this->searchId = $searchId;
    }

    public function getSearchId()
    {
        return $this->searchId;
    }

    public function setZsduoId($zsduoId)
    {
        $this->zsduoId = $zsduoId;
    }

    public function getZsduoId()
    {
        return $this->zsduoId;
    }

    public function getParams()
    {
        $params = [
            'type'                         => $this->type,
            'cash_gift_id'                 => $this->cashGiftId,
            'cash_gift_name'               => $this->cashGiftName,
            'custom_parameters'            => $this->customParameters,
            'generate_authority_url'       => $this->generateAuthorityUrl,
            'generate_mall_collect_coupon' => $this->generateMallCollectCoupon,
            'generate_qq_app'              => $this->generateQqApp,
            'generate_schema_url'          => $this->generateSchemaUrl,
            'generate_share_image'         => $this->generateShareImage,
            'generate_short_link'          => $this->generateShortLink,
            'generate_short_url'           => $this->generateShortUrl,
            'generate_we_app'              => $this->generateWeApp,
            'generate_weixin_code'         => $this->generateWeixinCode,
            'goods_gen_url_param_list'     => $this->goodsGenUrlParamList,
            'goods_sign_list'              => $this->goodsSignList,
            'material_id'                  => $this->materialId,
            'multi_group'                  => $this->multiGroup,
            'p_id'                         => $this->pid,
            'search_id'                    => $this->searchId,
            'zs_duo_id'                    => $this->zsduoId,
        ];
        return array_filter($params);
    }
}
